5.4.1 Outline the features of an object.


An object is a combination of data and the operations that can be performed in association with that data. Each data part of an object is referred to as a data member while the operations can be referred to as methods. The current state of an object is stored in its data members and that state should only be changed or accessed through the methods.

Common categories of operations include: the construction of objects (initialisation); operations that either set (mutator methods)
or return (accessor methods) the data members; operations unique to the data type; and operations used internally by the object.

5.4.2 Explain the basic features and advantages of encapsulation.


Encapsulation is the combination of data and the operations that act on the data into a single “program unit” called an object. The
advantages are that it allows for information and data hiding.

Advantage
Disadvantage
Encapsulation conceals the functional details of a class from objects that send messages to it.
Whereas abstraction focuses on reducing the complexity of how we view the real world, encapsulation concentrates on the design of our C# source code. It is a powerful mechanism for reducing complexity and protecting data of individual objects on the programming level.
The reason for encapsulation is to prevent clients of an interface from depending on those parts of the implementation that are likely to change in future, thereby allowing those changes to be made more easily,

It’s data hiding or data abstraction. Private member variables of a class are encapsulated so that they can only be accessed by specific methods/properties. This will prevent data corruption.

C++ programmers try to keep member variables private. This data hiding promotes encapsulation and allows you to change your implementation of the class without breaking the interface your clients rely on.

Like the above way we can protect the private data from the outside world

Encapsulation Explained

5.4.3 Explain the basic features and advantages of information and data hiding.

Once encapsulated into an object both the data members and the details of the implementation of the member functions can be hidden. This allows the object to be used at an abstract level.

I.E: Methods and data can be hidden so that they cannot be accessed from an unauthorized class. This is useful to keep data private (e.g. bank accounts) or to allow a program's modules to be updated since an accessor or mutator method must be used to change the data. This means that the interface e.g. a GUI is not broken if the object's methods or data structure is changed.

5.4.4 Explain the basic features and advantages of polymorphism.


Polymorphism describes the situation in which the same operation can be applied to different objects, with each object behaving
appropriately. The concepts of templates, virtual member functions and operator overloading are not required. Polymorphism allows
objects to be used intuitively and it simplifies coding by making it generic.

Java Tutorials - Polymorphism

5.4.5 Explain the basic features and advantages of inheritance.


Inheritance allows one object to be derived from another. The derived object has all the data members and member functions of the
original object and any additional data member or member functions that are defined within it. Even previously defined functionality may be redefined with the appropriate functionality applied to the particular object that invokes it. In Java, all classes are subclasses of the object class. When functions (including constructors) are redefined in a derived object, they completely override the original
function. Inheritance in Java is limited to one object being derived from another (one level of inheritance). Multiple inheritance is not
supported by the Java language.

Java Tutorials - Inheritance

5.4.6 Trace an algorithm that includes objects.


Practice. ^_^


Further reading:


Encapsulation, Inheritance, Polymorphism Summary and exercises